* process.c (handle_child_signal): Fix crash; deleted pid.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 05:46:17 +0000 (22:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 05:46:17 +0000 (22:46 -0700)
This was introduced by my 2013-08-12 fix for Bug#15035.

src/ChangeLog
src/process.c

index c5949a1e294bb9a28d5a5bbfc032189406474375..a41ff1d92b3676c242699de388b63407326adabf 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
+       This was introduced by my 2013-08-12 fix for Bug#15035.
+
 2013-08-19  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
index 64cb401c06a32cfd5c50c73019ddc1d0a8abb834..c4dd87a6b4850e984cd8c3ef46ad2cec058c5a84 100644 (file)
@@ -6153,7 +6153,10 @@ handle_child_signal (int sig)
        = (MOST_NEGATIVE_FIXNUM <= TYPE_MINIMUM (pid_t)
           && TYPE_MAXIMUM (pid_t) <= MOST_POSITIVE_FIXNUM);
       Lisp_Object head = XCAR (tail);
-      Lisp_Object xpid = XCAR (head);
+      Lisp_Object xpid;
+      if (! CONSP (head))
+       continue;
+      xpid = XCAR (head);
       if (all_pids_are_fixnums ? INTEGERP (xpid) : NUMBERP (xpid))
        {
          pid_t deleted_pid;